<template>
  <div class="like">
		<keep-alive>
			<like-header></like-header>
		</keep-alive>
		<like-banner :bannerData="bannerData"></like-banner>
		<like-card :cardInfo="cardInfo"></like-card>
		<like-recommend :recommendInfo="recommendInfo"></like-recommend>
		<like-calendar :calendarInfo="calendarInfo"></like-calendar>
		<like-comment :commentInfo="commentInfo"></like-comment>
  </div>
</template>

<script>
	import {getLike} from '@/api'
	import LikeHeader from 'likebase/Header'
	import LikeBanner from 'likebase/Banner'
	import LikeCard from 'likebase/Card'
	import LikeRecommend from 'likebase/Recommend'
	import LikeCalendar from 'likebase/Calendar'
	import LikeComment from 'likebase/Comment'
	
export default {
	name: 'Like',
	data() {
		return {
			// LikeBanner
			bannerData: {
				gallaryImgs: [],
				sightName: [],
			},
			cardInfo: {},
			recommendInfo: [],
			calendarInfo: [],
			commentInfo: []
		}
	},
	components:{
		LikeHeader,
		LikeBanner,
		LikeCard,
		LikeRecommend,
		LikeCalendar,
		LikeComment
	},
	created(){
		getLike(this.$route.query.id).then( res=>{
			this.bannerData.gallaryImgs = res.gallaryImgs;
			this.bannerData.sightName = res.sightName
			this.cardInfo = res.cardInfo
			this.recommendInfo = res.recommendInfo
			this.calendarInfo = res.calendarInfo
			this.commentInfo = res.commentInfo
			console.log(res)
		})
	}
}
</script>

<style lang='stylus' scoped>

</style>
